package com.aspose.cells;

public class ReferredArea {
   private zaye a;
   private zaay b;

   ReferredArea(zaye rr, zaay relInfo) {
      this.a = rr;
      this.b = relInfo;
   }

   zaye a() {
      return this.a;
   }

   public boolean isExternalLink() {
      zur var1 = this.a.a(this.b);
      return var1 != null && (var1.a & '\uffff') != this.b.p.i;
   }

   public String getExternalFileName() {
      zur var1 = this.a.a(this.b);
      if (var1 != null && (var1.a & '\uffff') != this.b.p.i) {
         zbqg var2 = this.b.p.g.v().a(var1.a & '\uffff');
         return var2.j();
      } else {
         return null;
      }
   }

   public String getSheetName() {
      zur var1 = this.a.a(this.b);
      if (var1 == null) {
         return this.b.d == null ? null : this.b.d.getName();
      } else if ((var1.a & '\uffff') != this.b.p.i) {
         zbqg var3 = this.b.p.g.v().a(var1.a & '\uffff');
         return var3.c() != null && (var1.b & '\uffff') < var3.c().length ? var3.c()[var1.b & '\uffff'] : null;
      } else {
         WorksheetCollection var2 = this.b.p.g;
         if (var1.b == var1.c) {
            return (var1.b & '\uffff') >= 0 && (var1.b & '\uffff') < var2.getCount() ? var2.get(var1.b & '\uffff').getName() : null;
         } else {
            return var2.get(var1.b & '\uffff').getName() + ":" + var2.get(var1.c & '\uffff').getName();
         }
      }
   }

   public boolean isArea() {
      return !this.a.m();
   }

   public int getEndColumn() {
      return this.a.h();
   }

   public int getStartColumn() {
      return this.a.d();
   }

   public int getEndRow() {
      return this.a.f();
   }

   public int getStartRow() {
      return this.a.b();
   }

   public Object getValues() {
      zaal var1 = new zaal(32, this.a);
      if (var1.l(this.b)) {
         return "#REF!";
      } else if (this.a.m()) {
         return var1.e(this.b).b(this.b);
      } else {
         zahn var2 = var1.a(this.b, false);
         Object[][] var3 = zayc.b(var2, this.b);
         var2.a(true);
         return var3;
      }
   }

   public Object getValue(int rowOffset, int colOffset) {
      zaal var3 = new zaal(32, this.a);
      if (var3.l(this.b)) {
         return "#REF!";
      } else {
         return this.a.m() ? var3.e(this.b).b(this.b) : var3.a(new int[]{rowOffset, colOffset}, this.b, false).b(this.b);
      }
   }

   boolean a(ReferredArea var1) {
      return this.a.equals(var1.a);
   }
}
